package com.oriental.manage.pojo.specially;

import com.oriental.manage.model.specially.AreaCode;
import com.oriental.manage.model.specially.AreaNumber;
import com.oriental.manage.pojo.base.BaseModel;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.NotBlank;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Pattern;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * Created by luoxin on 2017/4/20.
 */
@Data
public class PersonRiskInfo extends BaseModel {

    private String id; //

    private String riskId= ""; //返回Id

    private String cusProperty= ""; //客户属性

    private String riskType= ""; //风险类型

    private String cusNature = ""; //商户属性

    @NotBlank(message = "手机号码输入有误")
    @Pattern(regexp = "^(\\s)||(1[0-9]{10})$",message = "手机号码输入有误")
    private String mobileNo = ""; //手机号

    @NotBlank(message = "MAC输入有误")
    @Pattern(regexp = "^(\\s)||(([0-9A-Z]{2})-([0-9A-Z]{2})-([0-9A-Z]{2})-([0-9A-Z]{2})-([0-9A-Z]{2})-([0-9A-Z]{2}))||(([0-9A-Z]{2}):([0-9A-Z]{2}):([0-9A-Z]{2}):([0-9A-Z]{2}):([0-9A-Z]{2}):([0-9A-Z]{2}))$",message = "手机号码输入有误")
    private String mac = ""; //mac地址

    @NotBlank(message = "Imei输入有误")
    @Pattern(regexp = "^(\\s)||([0-9]{0,32})$",message = "Imei输入有误")
    private String imei=""; //Imei

    @NotBlank(message = "银行帐/卡号输入有误")
    @Pattern(regexp = "^(\\s)||([0-9]{0,32})$",message = "银行帐/卡号输入有误")
    private String bankNo=""; //银行帐/卡号

    private String openBank=""; //开户行

    private String cusName=""; //客户姓名/简称

    @NotBlank(message = "身份证件号码输入有误")
    @Pattern(regexp = "^(\\s)||(\\d{17}([0-9]|X|x))||(\\d{15})$",message = "身份证件号码输入有误")
    private String docCode=""; //身份证件号码

    @NotBlank(message = "IP地址输入有误")
    @Pattern(regexp = "^(\\s)||(([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3})\\.([0-9]{1,3}))$",message = "IP地址输入有误")
    private String ip=""; //IP地址

    private String address=""; //地址

    @NotBlank(message = "固定电话格式有误")
    @Pattern(regexp = "^(\\s)||(([0-9]{3}[\\-][0-9]{8})|([0-9]{4}[\\-][0-9]{7,8}))$",message = "固定电话格式有误")
    private String telephone=""; //固定电话

    @NotBlank(message = "收款银行帐/卡号输入有误")
    @Pattern(regexp = "^(\\s)||([0-9]{0,32})$",message = "收款银行帐/卡号输入有误")
    private String recBankNo=""; //收款银行帐/卡号

    private String recOpenBank=""; //收款账/卡号开户行

    private String email=""; //Email

    private String level=""; //信息级别

    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date occurtimeb; //风险事件发生时间，时间格式，YYYY-MM-DD,例如2016-06-07
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date occurtimee; //风险事件结束时间，时间格式，YYYY-MM-DD,例如2016-06-07

    private String occurchan=""; //风险事件发生渠道

    private String occurarea=""; //风险事件发生地域
    private List<AreaNumber> basicData=new ArrayList<>();
    private String note=""; //风险事件描述
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date validDate; //有效期 格式：yyyy-MM-DD

    private String orgId=""; //上报机构（数字、下划线、字母）

    private Date repDate; //上报日期 格式：yyyy-MM-DD HH:mm:ss

    private String repType=""; //上传方式（值：03），参见数据字典定义

    private String repPerson=""; //上传人

    private String updateType; //操作(变更类型)

    private String status; //状态

    private String content;//审核拒绝原因
}
